<template>
	<view>
		<madia-page type="pc">
			<view class="h100 app-page flex-row-between flex-col-center pl30 pr30">
				<text class="color-white">今天是：{{time}}</text>
				
			</view>
		</madia-page>
		<madia-page type="app">
			<view class="h100 app-page flex-row-between flex-col-center pl30 pr30">
				<text class="color-white">今天是：{{time}}</text>
				<uni-icons @click="openBars" type="bars" size="30" color="#fff"></uni-icons>
			</view>
		</madia-page>
		
		<uni-drawer ref="drawer" mode="right">
		    <view style="padding:30rpx;">
		        <view class="uni-title">抽屉式导航</view>
		    </view>
		</uni-drawer>
	</view>
</template>

<script>
	import timeFormat from '@/utils'
	import uniIcons from '@/components/uni-icons/uni-icons.vue'
	import uniDrawer from "@/components/uni-drawer/uni-drawer.vue"
	export default {
		components:{
			uniDrawer,
			uniIcons
		},
		data() {
			return {
				time: null
			}
		},
		mounted() {
			let newTime = new Date().getTime()
			console.log(112);
			this.time = timeFormat(newTime,'yyyy年mm月dd日');
		},
		methods: {
			openBars() {
				this.$refs.drawer.open()
			}
		}
	}
</script>

<style lang="scss">
$main-color:#ea6f84;
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	.app-page{
		background-color: $main-color;

	}
</style>
